package com.yuqian.JavaSe.datatype;

import java.io.Console;


/**
 * 整型有四种：
 * 1.int   4字节
 * 2.short 2字节
 * 3.byte  1字节
 * 4.long  8字节
 * @author yuqian
 *
 */
public class IntType {
	//java7 新增特性:数字可以加_区分，编译器会自动去掉
	int a = 222;
	
	//java7 新增特性:0b标示 2进制数
	int b = 222;
	
	int c;
	
	public int get(int s){
		return s;
	}
	
	public static void main(String[] args) {
		/*IntType inttype= new IntType();
		//int d;
		int k=5;
		//k=k+2.0;
		System.out.println(true&false);
		
		int m = 513;
		byte l =(byte)m;
		System.out.println(l);
		//Math
		
		Console in =System.console();
		String usn=in.readLine("UserName:");*/
		//String pas=in.readLine("Password:");
		//System.out.println(usn);
		//System.out.println(pas);
		
		Console cnsl = null;
	      String name = null;
	      
	      try{
	         // creates a console object
	         cnsl = System.console();

	         // if console is not null
	         if (cnsl != null) {
	            
	            // read line from the user input
	            name = cnsl.readLine("Name: ");
	            
	          Class s =  IntType[].class;
	            
	            // prints
	            System.out.println("Name entered : " + name);
	         }      
	      }catch(Exception ex){
	         
	         // if any error occurs
	         ex.printStackTrace();      
	      }
	}
}
